package com.hdax.dm.Controller.desc;

import com.hdax.dm.dto.descDto.getItemsDto;
import com.hdax.dm.dto.descDto.getRecommendDto;
import com.hdax.dm.service.getItemsService;
import com.hdax.dm.utils.response.CommonResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/item")
public class getRecommendController {

    @Autowired
    private getItemsService getItemsService;

    /**
     * 详情页
     */
    @PostMapping("desc/getRecommend")
    public CommonResponse<List<getRecommendDto>> getRecommend(@RequestBody Map<String,Integer> params){
        return getItemsService.getRecommend(params);
    }
}
